package com.tiancheng.trade.payment.convert;

import com.tiancheng.trade.commom.core.data.notify.PayRefundSettleResultMsgBO;
import com.tiancheng.trade.commom.core.data.notify.PaySettleResultMsgBO;
import com.tiancheng.trade.payment.bo.PaymentFlowDetailSettleBO;
import com.tiancheng.trade.payment.bo.PaymentFlowDetailSettleDetailBO;
import com.tiancheng.trade.payment.model.PaymentFlowDetailSettle;
import com.tiancheng.trade.payment.model.PaymentFlowDetailSettleDetail;
import com.tiancheng.trade.payment.model.RefundSettle;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @ClassName SettleConvert
 * @Description 结算实体转换
 * @Author kellen
 * @Date 2025/3/17 22:28
 */
@Mapper(componentModel = "spring")
public interface SettleConvert {
    SettleConvert INSTANCE = Mappers.getMapper(SettleConvert.class);

    /**
     * 转换支付结算通知实体
     *
     * @param settle
     * @return
     */
    PaySettleResultMsgBO convert2PaySettleResultMsgBO(PaymentFlowDetailSettle settle);

    PayRefundSettleResultMsgBO convert2PayRefundSettleResultMsgBO(RefundSettle settle);

    PaymentFlowDetailSettleDetailBO convert2PaymentFlowDetailSettleDetailBO(PaymentFlowDetailSettleDetail bean);
    List<PaymentFlowDetailSettleDetailBO> convert2PaymentFlowDetailSettleDetailBOs(List<PaymentFlowDetailSettleDetail> list);
    PaymentFlowDetailSettleBO convert2PaymentFlowDetailSettleBO(PaymentFlowDetailSettle paymentFlowDetailSettle, List<PaymentFlowDetailSettleDetail> details);
}
